#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int NumberOf1(int n) {
    // write code here
    int a = 1;
    int count = 0;
    int l = sizeof(int) * 8;
    while (l > 0)
    {
        if ((a & n) == 1)
        {
            count++;
        }
        n=n >> 1;
        l--;
    }
    return count;
}
int main()
{
    int n;
    scanf("%d", &n);
    int ret = NumberOf1(n);
    printf("%d", ret);
    return 0;
}